package com.bwie.repository;

import com.bwie.pojo.User;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface UserRepository   extends JpaRepository<User,Integer> {

    //根据姓名查找
    User findByUsername(String username);
    //根据姓名模糊
    List<User> findByUsernameLike(String username);
    //根据姓名模糊查询和pic精确查询,注意参数有顺序
    List<User> findByUsernameLikeAndPic(String username,String pic);

    //这个是啥意思
//    @Query(
//            value = "select * from t_student left join t_yupe"
//            ,nativeQuery = true
//    )
//    List<User> findByCondition(User user);


}
